package com.an.common.constant;

/**
 * 缓存的key 常量
 *
 * @author Ann
 */
public interface CacheConstants {

    /**
     * 登录用户 redis key
     */
    String LOGIN_TOKEN_KEY = "Authorization:login:token:";

    /**
     * 在线用户 redis key
     */
    String ONLINE_TOKEN_KEY = "online_tokens:";

    /**
     * 验证码 redis key
     */
    String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 参数管理 cache key
     */
    String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    String SYS_DICT_KEY = "sys_dict:";

    /**
     * 防重提交 redis key
     */
    String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 限流 redis key
     */
    String RATE_LIMIT_KEY = "rate_limit:";

    /**
     * 登录账户密码错误次数 redis key
     */
    String PWD_ERR_CNT_KEY = "pwd_err_cnt:";


    /**
     * 邮件注册代码key
     */
    String MAIL_REGISTER_CODE_KEY = "mail:register:code:";

    /**
     * 邮件忘了代码关键
     */
    String MAIL_FORGOT_CODE_KEY = "mail:forgotPwd:code:";

    /**
     * 邮件登录代码关键
     */
    String MAIL_LOGIN_CODE_KEY = "mail:login:code:";


    /**
     * 喜欢文章关键
     */
    String ARTICLE_LIKED_KEY = "blog:liked:article:";
    String SOCIAL_LOGIN_KEY = "socialLogin:{}:userInfo:";

    /**
     * 博客每日图片
     */
    String BLOG_DAILY_IMAGE = "blog:dailyImage:";

}
